package org.adoxx.adows.client.main; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import javax.xml.rpc.ServiceException; import org.adoxx.adows.client.ADOxxWebService; import com.boc_eu.adoweb.adows.adoscript.GetModelImageMap; /** * @author wutz * * EXPERIMENTAL: Sample implementation to retreive the image map of a model. * * FIXME: the return XML is currently available as a XML in String * format, in case further steps are needed, parsing of the return needs * to be implemented. * * FIXME: the modelid is hard-coded and needs to be dynamically * retrieved from TOC interaction * */ public class RunADOxxServiceInteractionModelImageMap { public static void main(String[] args) throws ServiceException, IOException { // load property for endpoint reference Properties prop = new Properties(); InputStream inputStream = RunADOxxServiceInteractionModelDocuXML.class.getClassLoader().getResourceAsStream("config.properties"); prop.load(inputStream); // Construct the ADOxx service as a singleton in the application. ADOxxWebService service = ADOxxWebService.getInstance(prop.getProperty("endpoint")); // Create the interaction object, using the service, the modelid and // scale, implictly triggers the service interaction, and returned in // HTML IMAGEMAP format GetModelImageMap imageMAp = new GetModelImageMap(service, 11969, 1.00); // Handle the results System.out.println(imageMAp.getResult()); } }